package com.example.myapplication.network.api

import com.example.myapplication.network.core.RetrofitFactory
import retrofit2.http.GET

data class Category(
    val id: Int,
    val name: String,
    val parentId: Int,
    val level: Int,
    val imageUrl: String,
    val sortOrder: Int,
    val children: List<Category>
)

interface CategoryApiService {
    companion object{
        fun getInstance(): CategoryApiService{
            return RetrofitFactory.create(CategoryApiService::class.java)
        }
    }

    @GET("categories")
    suspend fun getCategories(): List<Category>
}